package com.xmy.cultivate.mapper;

import com.xmy.cultivate.entity.RatePay;
import com.xmy.cultivate.entity.RateQuantityPayOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 达到多期缴费量的订单id Mapper 接口
 * </p>
 *
 * @author hpiggy
 * @since 2025-06-18
 */
public interface RateQuantityPayOrderMapper extends BaseMapper<RateQuantityPayOrder> {

    @Select({"<script>",
            "SELECT * ",
            "FROM rate_quantity_pay_order ",
            "WHERE ",
            "rate_quantity_pay_id = ${rateQuantityPayId} ",
            "AND order_id = ${orderId} ",
            "LIMIT 1",
            "</script>"})
    public abstract RateQuantityPayOrder getRateQuantityPayOrderByPayId(@Param("rateQuantityPayId") Long rateQuantityPayId, @Param("orderId") Long orderId);

}
